package com.itfitness.calendarview.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import  androidx.viewpager2.adapter.FragmentStateAdapter


/**
 *
 * @Description:     java类作用描述
 * @Author:         作者名
 * @CreateDate:     2022/2/14 15:51
 * @UpdateUser:     更新者：
 * @UpdateDate:     2022/2/14 15:51
 * @UpdateRemark:   更新说明：
 */
class CalendarFragmentAdapter(fm: FragmentActivity, fragments:List<Fragment>): FragmentStateAdapter(fm) {
    private var mFragments:List<Fragment> = fragments

    override fun getItemCount(): Int {
        return mFragments.size
    }

    override fun createFragment(position: Int): Fragment {
        return mFragments[position]
    }
}